package club.justwill.single.Service;

import club.justwill.single.bean.*;
import club.justwill.single.model.JsonResponse;
import club.justwill.single.model.SecurityToken;
import club.justwill.single.model.SessionState;
import club.justwill.single.persistence.document.SessionData;
import club.justwill.single.persistence.document.UserAddress;
import club.justwill.single.persistence.document.UserAdvice;
import club.justwill.single.persistence.document.UserSecurityCode;
import club.justwill.single.persistence.jpo.User;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import java.util.List;

/**
 * Created by xiangnan on 15-12-23.
 */
public interface UserService {
    public User authenticate(SecurityToken token, SessionState sessionState, UserLogin userLogin, JsonResponse obj);
    public void signUp(SecurityToken token, UserSignUp userSignUp, JsonResponse obj, SessionState sessionState);
    public void resetPassword(SecurityToken token, UserChangePassword userChangePassword, JsonResponse obj, SessionState sessionState);
    public List<UserAddress> getAddress(SecurityToken token, JsonResponse obj);
    public void updateAddress(SecurityToken token, JsonResponse obj, UpdateUserAddress updateUserAddress);
    public void addAddress(SecurityToken token, JsonResponse obj, AddUserAddress addUserAddress);
    public void deleteAddress(SecurityToken token, JsonResponse obj, String AddressId);
    public SessionData isLoginIn(String single);
    public SessionData isAppLogIn(String jsessionid);
    public void followProject(SecurityToken token, JsonResponse obj, long projectId);
    public List<ProjectsResp> searchFollowedProject(SecurityToken token, JsonResponse obj, SearchProjects searchProjects);
    public List<ProjectsResp> searchSupportedProject(SecurityToken token, JsonResponse obj , SearchProjects searchProjects);
    public List<User> searchCommercial(SecurityToken token, JsonResponse obj, int index, int size);
    public void exLogIn(SecurityToken token, ExLogIn exLogIn, JsonResponse obj, SessionState sessionState);
    public String uploadHeadIcon(SecurityToken token, JsonResponse obj, CommonsMultipartFile headIcon);

    public void setSecurityCode(SecurityToken token, JsonResponse obj, SecurityCode securityCode);

    public UserSecurityCode searchSecurityCode(long userId);

    public User getUserById(JsonResponse obj, long userId);

    public void unFollowProject(SecurityToken token, JsonResponse obj, long projectId);

    public void logout(JsonResponse obj, SecurityToken token);

    public void saveAlipayNumber(JsonResponse obj, SecurityToken token, String alipayNumber);

    public void linkWeiXin(JsonResponse obj, SecurityToken token, String code, Long userId);

    public void collectAdvice(JsonResponse obj, long userId, CollectAdvice collectAdvice);

    public List<UserAdviceResp> searchAdvice(JsonResponse obj, int index, int size) ;

    public List<UserResp> getUsers(JsonResponse obj, SecurityToken token, int index, int size);
}
